home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / MCASM.RAR / MC_ASM.EXE / WROX_ASM / CH4 / PROG4_4.ASM < prev    next >
Assembly Source File  |  1994-11-14  |  681b  |  35 lines

  1.  
  2. *********************************************************************************
  3.     Program 4.4 Crashing the Debugger by Stack Segment Overlap
  4. *********************************************************************************
  5.     
  6.     dosseg
  7.     .model large
  8.     .data
  9.             mess db 'My name is Prince',10,13,'$'
  10.     .code
  11.                 mov ax,@data
  12.                 mov ds,ax
  13.                 mov ax,cs
  14.     
  15.                 cli
  16.                 mov ss,ax
  17.                 mov sp,offset stck
  18.                 sti
  19.     
  20.                 call tell
  21.                 mov ah,4ch
  22.                 int 21h            ; Terminate
  23.     
  24.                 db 10 dup (?)        ; Reserve space for stack
  25.     stck:                    ; Initial stack pointer
  26.     
  27.     tell        proc near
  28.                 lea dx,mess
  29.                 mov ah,9
  30.                 int 21h            ; Output string
  31.                 ret
  32.     tell        endp
  33.     end
  34.  
  35.